You can make a script/batch file that takes a host name as an argument and produces specific switch on its output. Then use
!`command`pattern in PuTTY path to make use of that script. Use
!@pattern to pass a host name to the script. Use of
!@unfortunately comes at cost that WinSCP does not create temp site in PuTTY anymore. So you will need to explicitly pass a username using
!Upattern and you cannot pass other specific parameters.
%PROGRAMFILES%\PuTTY\putty.exe !`C:\path\portforward.bat !@` !U@!@
if "%1" == "example.com" echo -L80:localhost:80 -L5432:localhost:5432