Where [CastleType] is set as data type \"text\" in SQL Server and the query is:
SELECT * FROM [Village] WHERE [CastleType] = \'foo\'
I
You can't compare against text with the = operator, but instead must used one of the comparison functions listed here. Also note the large warning box at the top of the page, it's important.
text
=