switch inside tableview cellForRowAtIndexPath
<p>i want to use switch function inside tabview cellForRowAtIndexPath to change the content of table </p>

<p>the scenario : the flag variable should select which the case and return it's content.</p>

<p>the error : i have to use return cell out side the switch function if i use it still give me error.</p>

<pre><code>switch (flag){
    case 0 :

        let cell:mineCell = tableView.dequeueReusableCellWithIdentifier("mineCell")as! mineCell
        // User Name on cells
        cell.usernameLabel.text = creator[indexPath.row]

        //function

            else {
                print(error)
            }
        }

        return cell
        break

    case 1 :
        let cell:followingCell = tableView.dequeueReusableCellWithIdentifier("followingCell")as! followingCell
        // User Name on cells
        cell.followingNameLabel.text = creator[indexPath.row]

    //ffuntion

            else {
                print(error)
            }
        }

        return cell

        break
    case 2 :

        //funtion 
        break
    default:
        break

    }



 //*HERE i have to use return cell but if i use it will give me error in somehow * 

}
</code></pre>