SELECT * FROM site_catalog WHERE catalog_active='Y' AND ((catalog_id='12' AND catalog_url IS NULL) OR (catalog_url='12'))