title: SAS - PROC SQL- Assign a value to a column based on condition based on another columns
body: <p>I want to assign a value in new_col based on value in column 'ind' when months = 1;</p>
  <pre><code>idnum1  months  ind new_col
  1       1       X   X
  1       2       X   X
  1       3       Y   X
  1       4       Y   X
  1       5       X   X
  2       1       Y   Y
  2       2       Y   Y
  2       3       X   Y
  2       4       X   Y
  2       5       X   Y
  </code></pre>
  <p>Below query just assign the value X where months = 1 but I want in all the rows of new_col for all the id -</p>
  <pre><code>create table tmp as
  select t1.*, 
  case when months = 1 then ind end as new_col
  from table t1;
  </code></pre>
  <p>I am trying to do it in SAS using proc sql;</p>