Costa Rica playing for pride and likely the Swiss will win this.
If both Brazil and Switzerland win then the group winner could be decided by disciplinary records: Brazil have three yellows, Switzerland four. If they both lose then it will be the second and third places potentially decided by the same process.
The Swiss will qualify with a draw against Costa Rica, or if Serbia lose to Brazil.
If Switzerland lose by one goal and Serbia draw, second place will be decided by goals scored. If the sides finish with identical records then Switzerland would go through because they beat Serbia.
Serbia will qualify if they defeat Brazil. A draw would be enough if Switzerland lose to Costa Rica by more than one goal.