I have two fields in a legacy database. I want to query one of them, but its often null
, In this case is there like an if
statement like Where if field_a !== null { field_a='Value' } else { field_b='Value' }
My Question is, is there a way to do this in sql itself or would i have to do two queries, one to check if null, then an if statement in my logic?