How to allow to change php version via .htaccess in Apache?

If you plan to use mod_php, you can't, because the directive that takes care of loading the module can't be used in .htaccess context.

If your server is using mod_proxy and mod_proxy_fcgi to access a php-fpm server with your desired php version, because this method makes httpd completely "agnostic" on which php version you may be using, all you have to do is tell your server to point to the appropiate php-fpm unix socket for php files:

<FilesMatch \.php>
    SetHandler proxy:unix:/path/to/app.sock|fcgi://localhost/
</FilesMatch>