title: Nested "CASE when" statement
body: <p>How can i use a nested form of the 'case' statement in a sql query. i am trying to execute the  following query.</p>
  
  <pre><code>SELECT AccessTabF1.Month, AccessTabF1.Year, AccessTabF1.[Entity Number], 
  case when [Exp Year]= 2010 + 1
       then 'Expires in 1 to 5 Years'
       else
            case when [Exp Year]&gt;2010 + 5
                 then 'Expires After 5 Years'
                 else 'No Expiration Year Listed' 
  end
  from AccessTabF1
  </code></pre>