Which is better-way to casting model
Here is suggestions. Every approach has pros/cons, depending your app architecture and model complexity.
class MyResponseModel {
  // I think values in response model should be let instead of var
  // By definition response model should be immutable
  let question: String
  let id: String
  let answer: String

  // I guess MyResponseModel will be initialized from JSON and you can just conform it to Codable
  // Then you don't need this init(from dictionary: [String: Any])
  init(from dictionary: [String: Any]) {
    self.question = (dictionary[&quot;question&quot;] as? String) ?? &quot;&quot;
    self.id = (dictionary[&quot;id&quot;] as? String) ?? &quot;&quot;
    self.answer = (dictionary[&quot;answer&quot;] as? String) ?? &quot;&quot;
  }
}

struct MyTableCellViewModel {
  // I'm not sure what logic do you have, but I think it is better to define properties using let instead of var
  let title: String
  let detail: String
  let isSelected: Bool

  init(title: String, detail: String, isSelected: Bool) {
    self.title = title
    self.detail = detail
    self.isSelected = isSelected
  }

  // Approach #1: create initializer from necessary response model
  init(responseModel: MyResponseModel, isSelected: Bool) {
    self.init(title: responseModel.question, detail: responseModel.answer, isSelected: isSelected)
  }
}

// Approach #2: create separate mapper class (useful when you need to have external dependencies in order to map
// For example you need to add some info that is not relevant to MyResponseModel.
// Let's take cell selection info as an example

protocol MyTableCellSelectionProvider {
  func isCellSelected(for responseModel: MyResponseModel) -&gt; Bool
}

struct MyTableCellViewModelMapper {
  let cellSelectionProvider: MyTableCellSelectionProvider

  func map(responseModel: MyResponseModel) -&gt; MyTableCellViewModel {
    return MyTableCellViewModel(
      title: responseModel.question,
      detail: responseModel.answer,
      isSelected: cellSelectionProvider.isCellSelected(for: responseModel)
    )
  }
}

// Approach #3: define cell view model protocol

protocol MyCellViewModel {
  var title: String { get }
  var detail: String { get }
}

extension MyResponseModel: MyCellViewModel {
  var title: String { return question }
  var detail: String { return answer }
}