title: group by a calculated field in SQL
body: <p>I have written a query like this</p>
  
  <pre><code>CASE 
                WHEN [col1] = 's' THEN '1'
                WHEN [col1] = 't' THEN '2' 
                WHEN [col1] = 'u' THEN '3' 
                WHEN [col2] = 'v' THEN '4'
  .......
  END AS product,
  SUM(col3)
  FROM dbo.TableA
  </code></pre>
  
  <p>I want group by on product?
  How to do that?</p>