Here is what you should do:
Suppose you want to pick variables y1, y2 and y3 with row number n1, n2 and n3 (using x1,x2, confuses, because that makes one feel x1, x2, ...are variables while they are actually row numbers).
data your_dataset;
set your_dataset;
if (_n_=n1)|(_n_=n2)|(_n_=n3);
keep y1 - y3;
run;