How to deal with neck pain when moving side to side?

See below. Sharp neck pain usually comes from a degenerative joint or disc in the neck. Sometimes it's from a muscle strain or sprain. Early treatment options include a short course of nsaids (advil, aleve), gentle massage, moist heat, and focusing on posture. If pain lasts greater than 2 weeks see your physician.
See your doctor. This is a problem that necessitates a face-to-face meeting with your doctor. This will allow him/her to examine you, ask specific questions. And possibly order tests to find out what's wrong and what to do to help you.