There is a critical piece of information you have not provided: what differentiates each of the three rows from each other? I would expect (based on your sample description) that there should be another column which would identify, say, the "sub row". For example, your first would be subrow 1, the second subrow2, and the third subrow 3. You could then build three queries (if there were up to three subrows), each selecting one subrow. Make a destination table (for temporary purposes) that would have your columns 3,4,5 repeated three times. You might even repeat the "subrow" column three times if you wanted. Then append the subrow1 query results to the table with an append query. Using two update queries, link the destination table toeach of the subrow queries (for subrows 2 & 3) and update the contents of the appropriate column3,4,5 in the destination table to the value in the linked subrow query.
Here's an idea (sloppy though it may be) for using the data as you've described it:
Using a copy of your data table, build a query to select the first row of columns 3,4,5 for each AA BB combination. Append the results to the same kind of destination table described above.
Next, use the same type query to delete all of those "first" records.
Now run the same query, except this time you will be selecting what are actually the second rows of data (values 4,5,6). Make an update query as described above for the other method to place in the "subrow 2" set of the 3 data columns.
Delete these values from your temporary copy of the table.
Run the query again. This time it will be selecting the third set of data. Build a query linking this version of the query with the destination table, but this time (as in the above example) add to the third subrow set of the columns 3,4,5.
I hope you can follow this. You'll have to do some experimenting.