Solution:
I would create two different pages, each one with the different content. Then, I would use pre_get_posts to get a postid parameter. This way, you won’t have to deal with redirections.
function conditional_change_content_by_id( $query ){
if( $query->is_page( YOURPAGEID ) && $query->is_main_query() && (isset($_POST["pageid"]) && !empty($_POST["pageid"])) ) {
$query->set( 'page_id', $_POST["pageid"] );
}
}
add_action( 'pre_get_posts', 'conditional_change_content_by_id' );