##Alternative
SELECT
J.JobNumber,
RC.RateCategoryID
FROM @Job AS J
CROSS APPLY
(
-- Just the highest priority match per job
SELECT TOP (1)
Match.RateCategoryID
FROM
(
-- Priority 1: Match Managed, Category, and Customer
SELECT
RC.RateCategoryID,
[Priority] = 1
FROM @RateCategory AS RC
WHERE
RC.Managed = J.Managed
AND RC.Category = J.Category
AND RC.Customer = J.Customer
UNION ALL
-- Priority 2: Match Managed and Category
SELECT
RC.RateCategoryID,
[Priority] = 2
FROM @RateCategory AS RC
WHERE
RC.Managed = J.Managed
AND RC.Category = J.Category
AND RC.Customer IS NULL
UNION ALL
-- Priority 3: Match Managed
SELECT
RC.RateCategoryID,
[Priority] = 3
FROM @RateCategory AS RC
WHERE
RC.Managed = J.Managed
AND RC.Category IS NULL
AND RC.Customer IS NULL
) AS Match
ORDER BY
Match.[Priority] ASC
) AS RC;