Paul, here is a solution:
<?php
if (is_category('xyz')) {
Do something;
}
elseif (category('xyz2')) {
Do something else ;
}
elseif (category('xyz3')) {
Do something else;
}
else {
Do something if none of the above are true;
}
?>
– is_category can be replaced with any other conditional tag, ex: is_single(‘some single post’) OR is_post(‘some post’)