You don't state the version of Office/Access/Excel nor the context of usage so the question is difficult the to answer with certainty - nor can we even attempt to provide an example of SQL, for you without such information, that amounts to anything more than a best guess.
However, in Access, you have the use if IIF() or SWITCH() in a query SQL.
Personally, I would look at the
SWITCH() Function rather than nested IIF() conditionals as it is usually a cleaner and easier to maintain approach.
An Access example would be:
- SELECT Switch(TablePK=1,"Result1",TablePK=2,"Result2",TablePK=15,"Result3") AS Expr1
-
FROM tbl_example