Using the IIF Function If you are using a more modern version of SQL, it is useful to know that SQL Server 2012 introduced the very handy IIF function. IIF is a shorthand method for performing an IF...ELSE/CASE statement and returning one of two values, depending on the evaluation of the result. Restructuring our above example to use IIF is quite simple.