I was reading some SQL tips and found this small but quite handy tip. If you have a boolean column in your database which holds values like 0 and 1 , you can modify your Select queries to represent that data as a Yes or No by doing this.

SELECT SUBSTRING('YesNo', 4 - 3 * columnName, 3) as YesNo FROM TableName

The trick is if the column holds a value of 0, the SQL would read

SUBSTRING(‘YesNo’, 4, 3) which returns ‘No’

And if the Column has a value of 1, it becomes SUBSTRING(‘YesNo’, 1, 3) which returns ‘Yes’.

I like it. This was part of a bigger article found here.