The big cost will likely be the XD hub body (assuming your hub can be converted easily) and the 12 spd cassette (which is OMFG-expensive).
I've read 12 spd Shimano cassettes have the same cog spacing as SRAM cassettes and they are interchangeable, but I don't have personal experience with it (yet - stay tuned). However, in your case, you will still need to get a Microspline hub body in place of the HG body and a 12 spd cassette, although it seems the lower end Shimano 12 spd cassettes are more reasonably priced than the SRAM options (assuming you can find one in stock right now).