title: SQL Do not return column if value is zero
body: <p>This query returns one row with columns Ready, Processing, Complete, Failed and Error with totals for each.  Is there a way to rewrite this query so that columns that have a total of zero are not returned?</p>
  
  <p>I'm using this to populate the mschart control and I don't wan't labels on the chart if there are 0 instances of that category.</p>
  
  <pre><code>SELECT        
                SUM(CASE WHEN Status = 'R' THEN 1 ELSE 0 END) AS Ready,
                SUM(CASE WHEN Status = 'P' THEN 1 ELSE 0 END) AS Processing, 
                SUM(CASE WHEN Status = 'C' THEN 1 ELSE 0 END) AS Complete,
                SUM(CASE WHEN Status = 'F' THEN 1 ELSE 0 END) AS Failed,
                SUM(CASE WHEN Status = 'E' THEN 1 ELSE 0 END) AS Error
  FROM  MailDefinition 
  </code></pre>