SQL Conditional JOIN column [duplicate]
问题 This question already has answers here : SQL Conditional AND (4 answers) Closed 5 years ago . I want to determine the JOIN column based on the value of the current row. So for example, my job table has 4 date columns: offer_date, accepted_date, start_date, reported_date. I want to check against an exchange rate based on the date. I know the reported_date is never null, but it's my last resort, so I have a priority order for which to join against the exchange_rate table. I'm not quite sure how