A metal M readily forms sulphate MSO4 which is water insoluble. It forms oxide MO which becomes inert on heating. It forms insoluble hydroxide which is soluble in NaOH. The metal M is:
Be
Out of the various alkaline earth metals, BeSO4 and MgSO4 are water soluble. Further only BeO is amphoteric and therefore reacts with NaOH.