I have the condition where I'd like to select a random user based on whether they match one of three conditions:

1. If they match the ZIP code
2. If they match the city name
3. If they match the state name

If one is matched, then return the randomly selected result.

Essentially something like this (~pseudo-code):

```
SELECT * FROM user
INNER JOIN address ON address.id = user.address_id
WHERE address.zipcode = '00000' IF EXISTS ELSE (
    WHERE address.province = 'State Name' IF EXISTS ELSE
        (WHERE address.city = 'City Name')
)
ORDER BY RANDOM() LIMIT 1;

```

Is there any nice way to do this or is it easier just to split it into three separate queries?