In Inner join I want to check the condition -1 if condition - A is success, condition-2 if condition b success. For that i wrote the below but no luck.
Can someone help me out
INNER JOIN student_unit_attempt sua on sua.person_id=sei.person_id
AND (case
WHEN i_unit_attempt_status IS NOT NULL
THEN (sua.unit_attempt_status = 'ENROLLED')
WHEN i_unit_attempt_status IS NULL
THEN (sua.unit_attempt_status ='COMPLETED')
END)