How to check is the value in the table specified?

I need to check is the value in DB specified:
SELECT id from tablename WHERE id=1 AND status='success';

If status is not "success" you need to return or void or False

I tried to do so:
SELECT EXISTS (SELECT 1 from tablename WHERE id=1 AND status = 'success');

This request fulfills correctly, but it is necessary to change status to some non-existent, such as:
SELECT EXISTS (SELECT 1 from tablename WHERE id=1 AND status = 'success123');

it immediately begins to swear: "Wrong value for enum"
June 10th 19 at 16:03
1 answer
June 10th 19 at 16:05
Place the comparison field with the desired constant to select.

Find more questions by tags PostgreSQL