I am trying to join two tables based on the condition.
Table1:
ID Portfolio
3 Department
5 Laboratory
Table2:
DepartmentID LaboratoryID
3 5
How can I join ID from table 1 with DepartmentID and LaboratoryID with table 2?
I tried below and didn't work
INNER JOIN Table1 ON
(SELECT ID FROM Table1 WHERE Portfolio = 'Department') =
Table2.DepartmentID AND
(SELECT ID FROM Table1 WHERE Portfolio = 'Laboratory') =
Table2.LaboratoryID)