A mass by volume percent concentration solution is defined as grams of solute per 100 mL of solution, and multiplied by 100
If you assume a volume of 100 mL of solution, which would make the calculations easier, you'd get
This means that each 100 mL of solution contains 5 grams of sodium hydroxide. Use sodium hydroxide's molar mass to see how many moles you'd get
This would make the solution's molarity be
SIDE NOTE Don't forget that molarity is defined as moles of solute per liters of solution, that's why I converted 100 mL to L in the above equation.