There is only one TDI engine offered in the USA in the 2012 Golf, the CJAA, which would decode to the VIN digit M (fifth place). There is no L engine, even if we expand "Golf" to include the GTI and R.
The NCS Jetta, however, DOES use an L in the fifth place to denote the TDI engine (again, for this market, that would be CJAA only), and THAT engine is the same as your Golf however some of the bits attached to it, specifically some of the plumbing and for sure the wiring harness, are different because the NCS is not the same platform car as your A6 Golf.
So, if I think I have deciphered your vague question, and you are in need of a CJAA engine for your 2012 Golf, then yes, you could use a CJAA from an NCS Jetta or even a 2012-14 Beetle (which is more akin to the NCS than your Golf), but you'd need to strip it all down to the engine proper to make certain it would work. You could also use a CJAA from a 2010-14 Sportwagon as well.
Sorry I wasn't more specific. You did answer my question though. The 5th letter in the VIN is a M on my 2 door Golf TDI. Have compared with engines that are 5th letter in VIN is L and they are very similar. For some reason the M engines are more expensive than the L engines. Do you know of anywhere but ebay that sells good used engines.