I would like to use a normal QUERY
with where
operating in the usual way where A = 'Speed'
but with the selected column being determined based on a formula. Specifically, I want to return only the column that has a certain user-determined number in row 1. Row 1 has numbers from the range 4 to 10 without duplicates but in a variable order.
My sample data is:
A B C D E
-----------------------------------------------------------------
1 | ----- 5 6 7 8
2 | Speed Slow Fair Medium Fast
3 | Comfort Bad Barely acceptable Bla Bla,bla
4 | Reliability Low Acceptable Blabla Blablabla
The query should look something like:
=QUERY('Sheetname'!A1:E; "Select xxx where A = 'Speed')
I'm looking for what I should put in place of xxx depending on the values of row 1.