title: Converting SQL CASE WHEN statement plus group statement into LINQ
body: <p>How can I write in fluent linq syntax the "case when" sql statement?</p>
  
  <pre><code>select QueueItem, COUNT(*) as [Count],
  SUM(CASE WHEN Queued = 0 THEN 1 ELSE 0 END) AS [Sent],
  SUM(CASE WHEN Queued = 1 THEN 1 ELSE 0 END) AS Queued,
  SUM(CASE WHEN Success = 1 THEN 1 ELSE 0 END) AS Exported,
  SUM(CASE WHEN Success = 0 THEN 1 ELSE 0 END) AS Failed
  from ExportQueue x
  group by QueueItem
  </code></pre>
  
  <p>Is there some program that can convert SQL to LINQ? LinqPad maybe?</p>