This will subset the data if sorted by id session:
data want;
set have;
by id session;
if session in (1,2,3,4) or Last.id;
run;
If you really want to add a variable as shown something like:
data want;
set have;
by id session;
length want $ 4.;
if session in (1,2,3,4) then Want=put(session,best4.);
else if last.id then Want='Last';
run;