fix(mssql): Fix variable instance query for mssql

related to CAM-941