Database steps in a loop

I have a pdf form, which I’m reading to extract some data. Data is stored in variables named test1, test2, test3…test6

now I have to fetch data from my database table which matches the values of these variables
i.e.
first time query:
select col1, col2 from table where col3 = test1
second time it’ll be
select col1, col2 from table where col3 = test2
Third time:
select col1, col2 from table where col3 = test3

and so on.

I was trying to use a loop, but none of the SQL script, Table input or Database lookup steps are allowed in the loop.

how can i achieve the desired function ?

Hello Nipun,

Attaching this workflow for your reference. Please check if it helps you solve the problem.

Workflow.zip (5.2 KB)