How to store SQL query output columns as variables to be used as parameters for API data call in DAT

LearnDB1234
New Contributor III

I have a sql query which provides me with the below output :

Select FirstName,LastName,Title From Default.Name

Tony         Gonzalez Mr
Tom          Brady    Mr
Patricia     Carroll  Miss

I would like to store FirstName, LastName & title column output rows as variable so i can use these variables as an input to my API data call which would take the names and return me with the data