I am confused by the rest of your SQL statement. What exactly are you trying to achieve.
However, regarding the question itself, you cannot use an IF statement in SQL. However, you can use CASE status, for example:
CASE
WHEN e.active = 0 THEN 'true'
ELSE 'false'
END
a source
to share