var result = from entry in table where (value == null ? entry.something == null : entry.something == value) select entry;