How can we Insert dynamic values into a table in KATALON

How can we use “runtime values captured in variable” in insert MYSQL query?
Example:
Table in DB:
CREATE TABLE test {
iname VARCHAR (30),
location VARCHAR (30)
}
Test code:
mylist = [ john, houston]
//Insert data to table test
creating connection for db
then
sql.execute(INSERT INTO test (iname, location) VALUES (’${mylist[0]}’,’${mylist[1]}’))

its not working.
I tried java code to do the same.
String insertquery = ‘INSERT INTO test (iname, location)’
+ ’ VALUES (?,?)’;
def params = [‘a’, ‘b’]
println params
// insert the data
/* create the mysql insert preparedstatement
PreparedStatement preparedStmt = sql.prepareStatement(insertquery);
preparedStmt.setString (a, b);
// execute the preparedstatement
preparedStmt.execute();
Kindly provide solution with examples.

http://docs.groovy-lang.org/latest/html/documentation/core-differences-java.html#_gstrings