I had this issue of comparing two strings having two single quotes each. It was like comparing string "''" with "''".
This is how I did it:
SELECT * FROM TABLE_NAME
WHERE
TRIM(BEFORE_VAL UE)!=''''''
-- This query will return all records where BEFORE_VALUE (which is a VARCHAR(50) column) does not have string "''".