title: How to use a 'Searched Case Expression' in the .select method of a datatable? (ASP/ADO.net)
body: <p>Can someone please show me how to use a <a href="http://msdn.microsoft.com/en-us/library/ms181765%28v=sql.105%29.aspx" rel="nofollow"><strong>Searched</strong> CASE expression</a> inside of the <a href="http://msdn.microsoft.com/en-us/library/det4aw50%28v=vs.100%29.aspx" rel="nofollow">select method of a datatable</a>? I keep getting the error: </p>
  
  <blockquote>
    <p>Syntax error: Missing operand after 'WHEN' operator</p>
  </blockquote>
  
  <p>This is what I'm trying and it's not working with the error above.</p>
  
  <pre><code>DataRow[] unMappedRows = matches.Select("(CASE WHEN TRUE THEN 1 END) = 1");
  </code></pre>
  
  <p>I'm using SQL Server 2008 R2 and .NET Framework 4.</p>