Try this instead:
function default_category_featured_image() {
global $post;
$category = get_the_category($post->ID);
switch ($category[0]->term_id) {
case '2':
set_post_thumbnail($post->ID, '112');
break;
case '3':
set_post_thumbnail($post->ID, '115');
break;
case '4':
set_post_thumbnail($post->ID, '113');
break;
case '8':
set_post_thumbnail($post->ID, '114');
break;
default:
set_post_thumbnail($post->ID, '0');
}
}
add_action('the_post', 'default_category_featured_image');