A 2-1 victory in Warsaw sent Scotland above Poland into third place in section A1 and set up a two-legged play-off in March.