title: How to get count values for multiple values in one column
body: <p>My data is like this</p>
  
  <pre><code>Name Values
  A    Val1
  A    Val1
  A    Val2
  A    Val2   
  A    Val2
  B    Val1
  B    Val2
  </code></pre>
  
  <p>I want to ouput my data is this way</p>
  
  <pre><code>Name Val1Count Val2Count
  A    2         3
  B    1         1
  </code></pre>
  
  <p>I can get the Name and count(*) for Val1 with this query. </p>
  
  <pre><code>select [Name],count(*) FROM [table1]
  where [values]='Val1'
  group by [Name]
  </code></pre>
  
  <p>But I am not sure how to get the count(*) for val2 in the same row.</p>
  
  <p>I tried doing this, but looks like this is not supported</p>
  
  <pre><code>select [name],@val1count= (above query for val1), @val2count = (above query for val2)
  </code></pre>
  
  <p>Please help. Thanks for looking.</p>