title: Apache spark case with multiple when clauses on different columns
body: <p>Given the below structure: </p>
  
  <pre><code>val df = Seq("Color", "Shape", "Range","Size").map(Tuple1.apply).toDF("color")
  
  val df1 = df.withColumn("Success", when($"color"&lt;=&gt; "white", "Diamond").otherwise(0))
  </code></pre>
  
  <p>I want to write one more WHEN condition at above where size > 10 and Shape column 
  value is Rhombus then "Diamond" value should be inserted to the column else 0. I tried like below but it's failing</p>
  
  <pre><code>val df1 = df.withColumn("Success", when($"color" &lt;=&gt; "white", "Diamond").otherwise(0)).when($"size"&gt;10)
  </code></pre>
  
  <p>Please suggest me with only dataframe option with scala. Spark-SQL with sqlContext is not helpful idea for me.</p>
  
  <p>Thanks !</p>