- select
- case a.[RoleName] = 'student' then 'its student'
- when a.[RoleName] = 'teacher' then 'its teacher'
- when a.[RoleName] = 'princi' then 'its principal'
- else 'attendant'
- end from Roles]as a
- inner join RoleDetails as b on
- RoleId=b.RoleId
- where b.Reserveid='18'
i am getting an error at 02,03,04 line at "="
error: incorrect syntax near =
whats wrong in this query if anyone can help me
thanks,
subin.