Select X1 and the values 1, 2, 3 and 4 below it.
On the Formulas tab of the ribbon, in the Defined Names group, click Create from Selection, and click OK in the dialog.
Excel will name the range with 1, 2, 3 and 4 as X1_ (the underscore is because it cannot use X1 - that is a cell address).
Repeat for X2 and the values below it, and for X3 and the values below it.
Then select the cell under B, i.e. cell C8.
On the Data tab of the ribbon, click Data Validation.
Select List from the Allow drop down.
In the Source box, enter the formula
=INDIRECT(B8&"_")
Click OK.