I might be missing something if you don't have a nested loop.
The outer loop cycles through each entry:
while (cursor.moveToNext()) { ... // inner loop here ... }
and the inner loop will cycle through each column
for (i=0; i<cursor.getColumnCount(); i++) { ... String var1 = cursor.getString(i); ... }
source share