As seen from the question two tables are given,
Jobs(name,job1,job2) and Users(name)
. But in the results shown in the question, the
Where Dep='Op'
is given, from which it appears that there is one more column
Dep
in the
Jobs
table. Further the
Users
table is not used for the results shown.
If there is a column
Dep
in the
Jobs
table then the following sql statement can be used
SELECT Jobs1.Name, Jobs1.Job1, Jobs1.Job2, Jobs2.Job1, Jobs2.Job2
FROM
(SELECT Name, Job1, Job2
FROM Jobs
WHERE Dep = 'Op') Jobs1
JOIN
(SELECT Name, Job1, Job2
FROM Jobs
WHERE Dep = 'SA') Jobs2
ON Jobs1.Name = Jobs2.Name
[Edit] From the comment given to the Solution 1, it is seen that Dep is available in Users Table. Accordingly the Query is modified [/Edit]
SELECT Jobs1.Name, Jobs1.Job1, Jobs1.Job2, Jobs2.Job1, Jobs2.Job2
FROM
(SELECT Jobs.Name, Job1, Job2
FROM Jobs
JOIN Users ON Jobs.Name = Users.Name
WHERE Users.Dep = 'Op') Jobs1
JOIN
(SELECT Jobs.Name, Job1, Job2
FROM Jobs
JOIN Users ON Jobs.Name = Users.Name
WHERE Users.Dep = 'SA') Jobs2
ON Jobs1.Name = Jobs2.Name