Give posts a particular template based on the assigned category

nikolaou,

When I understand you question correct then you want to use different templates based on the categories you’re using within your posts, correct?

If that’s the case, then you only need one template (single.php) and a combination of get_the_terms() and get_template_part().

<?php

$categories = get_the_terms(get_the_ID(), 'slug');

if ( in_array('cat1', $categories) ) {
    get_template_part('partials/single', '1');
} elseif ( in_array('cat2', $categories) ) {
    get_template_part('partials/single', '2');
}

?>

You should place the code above within The Loop. The two template files are called single-1.php and single-2.php and stored within a folder called partials.

Sources: