How to SELECT record from a table where column is equal to a value but shouldn't be equal to another