It’s actually quite common for more than one test to be offered in a given language. You don’t have to worry too much about this, though.
All major academic language tests will be recognised by a majority of universities in appropriate countries and / or accredited by their ministries of education. It’s very rare for a specific university to refuse a well-known test when considering postgraduate applications.
This means that you’re more likely to find yourself choosing the most appropriate test rather than the right test. There are a couple of factors that might influence your decision.
Local and international tests
Where a higher education system recognises two different tests, it is possible that one will be administered locally and the other will be available internationally.
This is the case for German, for example, where the DSH test is only offered by universities in Germany, whilst the TestDaF is offered at approved testing centres around the world. Both are recognised by universities.
Unsurprisingly, internationally administered tests are often more convenient for international students. You can probably take one in your own country, without the need to arrange travel and accommodation.
There’s nothing to say you can’t take a locally administered test though. In fact, this will probably be more convenient if you’re already living in your intended country of study. If your prospective university administers the test you may even be able to take it as part of a campus visit or interview day.
Tests for world languages
It’s possible that the national language in your country of study is also used elsewhere, or may actually be derived from the mother-tongue of another country.
This would be the case in Brazil, for example, where the national language is Portuguese, or in French speaking regions of Switzerland or Canada.
In such cases different language tests may be offered to examine proficiency in a language for different countries. Dutch language tests, for example, include the Netherlands’ own NT2 exam and the CNaVT exam, which is intended for international variants of Dutch (such as used in Flemish speaking parts of Belgium).
Unsurprisingly, tests for international versions of a language will usually be administered internationally, whereas national tests are more likely to be offered locally.
Universities themselves probably won’t distinguish between tests intended for slightly different contexts. If you have a score that demonstrates proficiency in a language that will probably be enough.