If you have this problem, for example, using the switcher to have php 7.2. just go to this directory:
/usr/local/cwpsrv/htdocs/resources/conf/php_switcher
and find the .ini file that correspond with the php version you want to install, in this example will be 7.2.ini
find the line --with-pdo-mysql=/usr and replace /usr with mysqlnd
result: --with-pdo-mysql=mysqlnd
save changes and try again