PTI candidate wins KP by-election