custom query to get posts

Clarification of your question:
You want to show Posts of a certain category named “ABC” AND also you want to filter the posts with the tag named “XYZ”.

Answer:
If this is the scenario, have you tried: WP_Query()?

<?php    
// The Query

$args = array('post_type' => 'post',
              'category_name' => 'ABC',
              'tag' => 'XYZ',
              'meta_key' => 'priority',
              'orderby' => 'meta_value_num'
             );

$the_query = new WP_Query($args);

// The Loop
if ( $the_query->have_posts() ) {
    while ( $the_query->have_posts() ) {
        $the_query->the_post();
        echo '<li>' . get_the_title() . '</li>';
    }
} else {
    // no posts found
}
/* Restore original Post Data */
wp_reset_postdata();
?>

Something like this may solve your problem.

NOTE: I din’t test this one, try yourself with it. If you face any problem, please comment here, or if you find any solution, don’t forget to share that with me here.

Thanks.