Selecting starting View with condition

I hope this is the right forum.
I am new to learning Swift and I am coding an app.
My problem is the following.
I have a main screen which shows some things.
At every start of the app I want to check a variable. If the variable is like how I want it then my main screen should be shown. If the variable is wrong it should show the View which is called intro.

I tried it with somethings like this. But it doesnt work. How can I solve this problem with Storyboard and segues? I read about UINavigationController but I dont understand it:

 var test = hello
    override func viewDidLoad() {
        if test = hello {
            // l├Ądt daten beim start
        else {
           self.performSegue(withIdentifier: "goToIntro", sender: self)