Logical Functions - IIF (Transact-SQL) 2017-3-14 1 min to read Contributors. THIS TOPIC APPLIES TO:SQL Server (starting with 2012)Azure SQL DatabaseAzure SQL Data Warehouse Parallel Data Warehouse. Returns one of two values, depending on whether the Boolean expression evaluates to true or false in SQL Server.