title: Boolean Expressions in SQL Select list
body: <p>I want to create a SQL Select to do a unit test in MS SQL Server 2005. The basic idea is this:</p>
  
  <pre class="lang-sql prettyprint-override"><code>select 'Test Name', foo = 'Result'
  from bar
  where baz = (some criteria)
  </code></pre>
  
  <p>The idea being that, if the value of the "foo" column is "Result", then I'd get a value of true/1; if it isn't, I'd get false/0.</p>
  
  <p>Unfortunately, T-SQL doesn't like the expression; it chokes on the equals sign.</p>
  
  <p>Is there some way of evaluating an expression in the SQL select list and getting a returnable result? (Or some other way of achieving the unit testing that I want?)</p>
  
  <hr>
  
  <p>EDIT: 3 great, answers, all built around CASE. I'll accept feihtthief's as he's got the least rep and thus needs it the most. :-) Thanks to everyone.</p>