T-SQL IIF Function. I recently posted about new functions in T-SQL CONCAT and CHOOSE. To keep in line with these posts this article focuses on the IIF function, which is also new to SQL Server 2012. For those who are familiar with SSRS, Excel, or Access this function is a long time coming to T-SQL. IIF works very much like a simplified CASE statement in that it evaluates an expression and will return a scalar value based on whether the expression evaluates to true or false. IIF accepts three arguments the first of which is the boolean expression that will be evaluated, if this does not evaluate to a boolean expression an error will be returned.