One option would be to use get_the_terms() to get the terms of the current post for certain taxonomy. Then loop the found terms and check, if one of them has certain ID.
$terms = get_the_terms( get_the_ID(), 'product_cat' );
if ( ! is_wp_error( $terms ) && $terms ) {
foreach ($terms as $term) {
if ( 123 === $term->term_id ) {
echo '<img src="my-image.jpg">';
}
}
}
Another option could be to use has_term() to check, if the current post has certain term in a more compact way.
if ( has_term( $term_or_slug_or_term_id, 'product_cat' ) ) {
echo '<img src="my-image.jpg">';
}