How can I use the `if` statement in MYSQL query to return `yes` if it's true and `no` if it's not?

See the example :

`IF(table_name.field_name_value = 1, 'yes','no') AS active`

I'm trying something like this but with no success