Had sex with 2 person got pergnant. If I go for DNA test, will it match with both of them?

No. Occasionally, fraternal twins have two different fathers. Otherwise, one or the other men (they're men, right?) is the father. Best wishes and congratulations on your pregnancy.