title: Spark dataframe get column value into a string variable
body: <p>I am trying extract column value into a variable so that I can use the value somewhere else in the code. I am trying like the following</p>
  
  <pre><code> val name= test.filter(test("id").equalTo("200")).select("name").col("name")
  </code></pre>
  
  <p>It returns </p>
  
  <pre><code> name org.apache.spark.sql.Column = name
  </code></pre>
  
  <p>how to get the value?</p>