I have this select statement and what i am trying to accomplish is when AuditLog is null then set 'Enabled' but my issues is i am not sure how to handle it when it is not NULL, i want to be able to get the data from AuditLog into AuditLogEnabled when it is not null. I have tried adding an else, but have not been able to get it to work. can someone show me the correct way to write this.
select FirstName,AuditLog,
CASE WHEN AuditLog IS NULL THEN 'Enabled' END AS AuditLogEnabled
from UserDetail
where FirstName = 'test'