How to create a custom shortcode based on the layout?

You need to capture the attributes that passed to a shortcode. You can do that like this

add_shortcode('testimonial', 'testimonial_shortcode_func');
function testimonial_shortcode_func( $atts ) {
    $atts = shortcode_atts( array(
      'style' => 'default_value_if_no_value_is_provided',
    ), $atts );

    if( $atts['style'] == 'fancy' ) {
        //do something
    } else if ( $atts['style'] == 'something_else' ) {
        //do something
    }
    //And so on
    //finally return content, don't echo just return
}