I want to create a SQL Select to do a unit test in MS SQL Server 2005. The basic idea is this:
select \'Test Name\', foo
Use the case construct:
select 'Test Name', case when foo = 'Result' then 1 else 0 end from bar where baz = (some criteria)
Also see the MSDN Transact-SQL CASE documentation.