Why do we say 何と言いますか as opposed to どうやって言いますか or something along the those lines when asking how to say something? The first seems to be "Say what?" while the second would seem to me to say "How to say?"
One of the most basic structures for naming an object in Japanese is:
これは～といいます。 ---- This is called ～. / This is ～.
これは急須といいます。 ---- This is called a kyusu. / This is a kyusu.
Hence the interrogative:
simply by replacing the noun part with 何 and adding a か at the end.
BTW どうやって言いますか sounds as if you are asking about the manner of telling someone something; like, visiting him/her, or making a phone call, or just texting to him/her,...etc.