title: CASE function in SQL Server 2012 got error message
body: <p>Can somebody here help me?</p>
  
  <p>I am trying to use <code>CASE</code> function as below got error message said </p>
  
  <blockquote>
    <p>message 156 incorrect syntax near keyword 'CASE'.</p>
  </blockquote>
  
  <p>Thanks,</p>
  
  <pre><code>select distinct 
      FiscalYear 
      case
         when FiscalYear = '2014' 
            then 'FY2014/2015'
         when FiscalYear = '2015' 
            then 'FY2015/2016'
         when FiscalYear = '2016' 
            then 'FY2016/2017'
         else 'FY2017/2018'
      end
  from  
      DimDate
  order by 
      FiscalYear
  </code></pre>