title: SQL Server IIF vs CASE
body: <p>I recently came to know about the availability of <code>IIF</code> function in SQL Server 2012. I always use nested <code>CASE</code> in my queries. I want to know the exact purpose of the <code>IIF</code> statement and when should we prefer using <code>IIF</code> over <code>CASE</code> Statement in the query.
  I mostly use nested <code>CASE</code> in my queries.</p>
  
  <p>Thanks for all the inputs.</p>