title: Nested CASE Statement With ELSe (SQL Server)
body: <p>I have a CASE statement something like following</p>
  
  <pre><code>CASE 
         WHEN A IS NULL 
         THEN CASE
                   WHEN B IN ('C','D') THEN NULL
                   WHEN X NOT IN ('C','D') THEN Z
                   End
                   ELSE SOMETHING_ELSE -- Want to get here When 'A' IS NOT NULL
                   END AS 'Result'
  </code></pre>
  
  <p>I want to get to ELSE part when First CASE is not true i-e 'A' is not NULL. Can anyone suggest if i have wrongly nested them? not getting results right.</p>
  
  <p>Many Thanks,</p>