In your loop use has_term( $term, $taxonomy, $post )
.
- Check if the post has the term you are searching for.
- Check if there is a value for the custom field.
- Print the value, but don’t forget to escape it.
if ( has_term( 'blue', 'product_color', $post ) )
{
$field = get_post_meta( $post->ID, 'field_name', TRUE );
if ( ! empty ( $field ) )
echo esc_html( $field );
}