Hi,

I am trying to write a query that will select the value based on a column
id. I have the following table definition:
sku_number,
retail_level1,
retail_level2,
retail_level3,
retail_level4,
retail_level5,
retail_level6,
retail_level7

I am given the number of the retail level (eg. 6) and I must query the above
table to obtain the value of that level (ie - retail_level6). The level that
must be selected is unknown, therefore it cannot be hardcoded. I need to
dynamically select the field based on a parameter passed to the procedure
(query).

Any help is appreciated.

thank you,