Or get information from sashelp.vcolumn:
proc sql noprint;
select label into :label1 from sashelp.vcolumn where libname='WORK' & memname='AAA' & upcase(name)='X';
select label into :label2 from sashelp.vcolumn where libname='WORK' & memname='AAA' & upcase(name)='Y';
quit;