How old does my kid have to be to decide?

Recently left a TERRIBLE 13 year relationship. My 10 year old is having a difficult time. Will he have to take the strand? Is he olds enough to decide who he wants to stay with? His father has subpoenaed him to court!!! HELP!!!