Last Friday while having a discussion on various LINQ standard query operators the topic of expressing T-SQL CASE statement in LINQ came up. The most obvious solution to this is using the ternary operator as shown below: using (SchoolEntities sc = new SchoolEntities()) { var query = from grade in sc.StudentGrade join student in sc.Person [...]