Making the test behave differently based upon which environment it is hitting is much more difficult. In general the test should do the exact same thing no matter which environment it is hitting. Test Studio wants to assume that the application is 100% identical no matter which environment it is placed on.
Test Studio does not support changing the behavior of the test based upon data from the data source using the built-in IF/ELSE block. The IF/ELSE block does work on UI elements displayed in the browser. If there's something different in the UI based upon the environment then Test Studio can detect that and do something different.
The base URL is how you're supposed to navigate to a different environment. The NavigateTo step will use the base URL setting to control which URL the navigate step will go to. There's no need to put different environments in different rows of the data source.
If you don't mind writing code we can write code that will look at the data in the data source and do something different based upon that data. Here's a code sample showing you
how to read the data from the data source in a coded step. You just need to read the data and use it in and if block in the code. It is also possible to run a subtest from code. Thus, based upon the data in the data source, you can have the test execute a subtest A or subtest B.
Hopefully this gives you some ideas how to you can structure your tests.