const
youdll1='you1.dll';
youdll2='you2.dll';
......
youproc='youproc';
dllhandle:=nil
if (youvar=1) then
dllhandle:=LoadLibrary(youdll1);
elseif (youvar=2) then
dllhandle:=LoadLibrary(youdll2);
....
if dllhandle<>nil then
GetProcAddress(dllhandle,youproc).