SQL/database problem with variabel

I have a problem, been trying to solve it for hours without any luck.
I have got it down to knowing what the problem is but now how to solve it.

If i run my keyword like this, it works perfect
@Keyword
def TestmiljoInsight_PurchaseInvoiceTop() {
SQLHandler_ConS2Insight_Next sql = new SQLHandler_ConS2Insight_Next()
List res = sql.getSelectResults(SELECT TOP 5 * FROM Invoice)

}

But if i send a variable insteed like this, it fails and say its a SP (store procedure) problem
@Keyword
def TestmiljoInsight_PurchaseInvoiceTop() {
String test999 = “SELECT TOP 5 * FROM Invoice”;
SQLHandler_ConS2Insight_Next sql = new SQLHandler_ConS2Insight_Next()
List res = sql.getSelectResults(test999)

}

anyone know a way to solve this? because i use a text file to read all the diffrent tables i wanna test against, insteed of hardcoding them one and one