title: Using CASE WHEN in T-SQL select statement
body: <pre><code>    SELECT Country, EmployeeName, Name As [FullName], OutPut1, OutPut2, OutPut3, 
      (OutPut1 + OutPut2 + OutPut3) AS Total,
      CASE WHEN Name IS NULL THEN '.........' 
           WHEN Name IS NOT NULL THEN '??????'
           END) 
           AS ParentID
   FROM CTE_Report;
  </code></pre>
  
  <p>The CASE WHEN in the above statement is giving trouble with the error below. Any one know what i'm missing?</p>
  
  <blockquote>
    <p>Common table expression defined but not used..</p>
  </blockquote>