Firstly, please use [code][/code] tags around code / data to make it readable.
So your input file has zero commas in it so it is not technically a csv and this would also make -F',' pointless.
If the data is in fact comma separated, then the current awk appears to work just fine:
Code:
$ echo 'XYZ,PIN,5678' | awk -F, '{print " <Name=\""$1"\">";print " <es:"$2">"$3"</es:"$2"> "}'
<Name="XYZ">
<es:PIN>5678</es:PIN>
Is this not the output you desire?