How to make a field appear only if a post meta field has a defined value?

I would store the meta value in a variable, and use an if/elseif statement to determine what should be displayed, like so:

$registrazione_singolaono = get_post_meta( $post->ID, 'registrazione_singolaono', true );
$registrazione_multipla = get_post_meta( $post->ID, 'registrazione_multipla', true );

if ( 'singolo_file' == $registrazione_singolaono && ! empty( $registrazione_multipla ) ) {
    echo $registrazione_multipla;
} elseif ( 'piu_file' == $registrazione_multipla ) {
    // something else
}