O'Reilly logo
  • Dustin Waybright thinks this is interesting:

With the IIF function, you can return one value if an input predicate is true and another value otherwise. The function has the following form.

IIF(<predicate>, <true_result>, <false_or_unknown_result>)

This expression is equivalent to the following.

CASE WHEN <predicate> THEN <true_result> ELSE <false_or_unknown_result> END

From

Cover of Training Kit (Exam 70-461): Querying Microsoft® SQL Server® 2012

Note

non-standard function meant to aid in Access migration. Should use CASE.