I have a table that stores users. Every user has an ID, a Name and an Access Level. The three possible Access Levels are Administrator, Manager and Simple User.
What I want is to conditionally select from this table based on the Access Level value. I demonstrate the logic bellow:
- If user is
Administrator, then select all users (Administrators, Managers, Simple Users) - Else if user is
Managerselect allManagersand allSimple Users - Else if user is
Simple Userselect only himself
Is that possible?