Looking into JDBC Request Sampler documentation:
If the Variable Names list is provided, then for each row returned by a Select statement, the variables are set up with the value of the corresponding column (if a variable name is provided), and the count of rows is also set up. For example, if the Select statement returns 2 rows of 3 columns, and the variable list is A,,C, then the following variables will be set up:
A_#=2 (number of rows)
A_1=column 1, row 1
A_2=column 1, row 2
C_#=2 (number of rows)
C_1=column 3, row 1
C_2=column 3, row 2
So it will be:
vars.get('aa_1')
- for first row of the aa
column
vars.get('aa_2')
- for second row of the aa
column
vars.get('bb_1')
- for first row of the bb
column
- etc.
More information: Debugging JDBC Sampler Results in JMeter