Microsoft Access 2010
I have a table with a number of fields and I want to create a query which selects a field from the current record based on the value of another field in the query. Here is a simplified example
Table is 5 fields: ID, D1,D2, D3,Value
I want a query to return 2 fields
ID, result where if Value =1 result is D1, if value =2 result is D2 etc.
There are actually 31 fields top select from so a nested iif is too complex
Any suggestion on how to do this
I cannot change the table as it is an ODBC link from a corporate database