Find the number of moles of sodium you have:
n = m/M where m is your 20g of sodium and M is 22.99 g/mol.
Look at the stoichiometry of the equation - it's 2:2 when you are producing NaOH. So if you took 1 mole of Na, it'd produce 1 mole of NaOH (as the ratio is equal).
That means that your moles of sodium is equal to the moles of NaOH produced. Use the molar mass of NaOH - which is 39.998 g/mol along with your calculated number of moles to get the mass (the formula rearranges to m = nM).
This figure is the theoretical yield - what you would get if every last mole of sodium was converted into NaOH.
What you get in practice is the experminetal yield, and the percentage yield is the experimental yield divided by the theoretical yield - and then multiplied by 100%.