SELECT p.category, c.title AS subcategory, filename, longtitle, distance, IF(timehour=0, CONCAT(timemin,' minutes'), CONCAT(timehour,' hrs ',timemin,' mins')) AS drivetime, distance_extra, pagecontent, locationmap, routelink, website, ELT(hamletsize, 'village', 'town', 'city') AS hamletsize FROM ta_pages AS p LEFT JOIN ta_subcats AS c ON (subcategory=c.scid) WHERE shorttitle='Badger sightings in Hope Cove' LIMIT 1