I don't think LLBL supports case statements out of the box. this is syntax specific to SQL Server. You may be able to use IExpression to create a custom field which will do this. However it's usually better to execute logic within the business layer, no the database.