I have a sql query, I need to do a comparison where of a column that I am renaming based on certain conditions, but I get an error that the column does not exist, how can I do this?

```
select e.emp_nombre, nvl(e.emp_activo,1) as nivel
from gen_empresa e
where nivel = 1;

```