Iterating through list and calling method with different parameters for each item
The second parameter has the same value twice (query1) the first parameter also has the same value twice ("connectionstring1"), this means you can remove 1 if statement if you create 2 variables with initial values like this:

foreach (var environment in Environments)
{
    string connectionString = "connectionstring1";
    var query = query1;
    if (environment == "environment2")
    {
        query = query2;
    }
    else if (environment == "environment3")
    {
        connectionString = "connectionstring2";
    }
    FillList(connectionString, query);
}


Another option would be to add Dictionary&lt;string, Action&gt; which will allow you to easily map string -> method call like this:

Dictionary&lt;string, Action&gt; dictionary = new Dictionary&lt;string, Action&gt;
{
    ["environment1"] = () =&gt; FillList("connectionstring1", query1),
    ["environment2"] = () =&gt; FillList("connectionstring1", query2),
    ["environment3"] = () =&gt; FillList("connectionstring2", query1)
};
foreach (var environment in Environments)
{
    dictionary[environment].Invoke();
}