If condition doubt for single.php

hi friends,
since i have a blog in blogger(it is a images blog), so i recently moved to wordpress. After importing all posts from blogger to wordpress it is showing post tumbnail image in single post along with the post original image. So i changed the template. It good working for all imported posts.

But i posted many posts after came to wordpress. That template showing thumbnail images in main page , categeory page etc… But in single post it is not showing original image.

So i changed template again. |Its working good for all imported posts. Now the images are not showing in imported posts (single post).

So i decided to show separate single.php codes for each category.

So what i need is:- I gathers these 2 codes.

code 1:- (single.php of 1st template)
code 2:-(single.php of 2nd template)
Here i am copying these 2 codes.

In a template single.php code(what ever the template may be) i like to write if condition to solve my problem. I will tell u algorithm but please write the if condition code please. …

if( categeory_id=14 or 15 or 16 or 17)
Code 1 here.
code 2 here.

small suggestion:-
this code will get the categeory name.
foreach((get_the_category()) as $category) {
echo $category->cat_name . ’ ';

This code may be useful in if condition.

Thanks to all developers and to sitepoint team.


Maybe this can help you out : http://wordpress.org/support/topic/how-to-change-single-post-template-based-on-category