title: SSMS Query Comparing Two Values
body: <p>I am attempting to query from a multitude of tables right now for the purposes of graphing in Tableau. Among other data, each line of the query currently contains the following important to this question...</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Name</th>
  <th>Enrollment Status</th>
  <th>Date Diff</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>Company 1</td>
  <td>Enrolled</td>
  <td>NULL</td>
  </tr>
  <tr>
  <td>Company 2</td>
  <td>Unenrolled</td>
  <td>12</td>
  </tr>
  <tr>
  <td>Company 3</td>
  <td>Unenrolled</td>
  <td>41</td>
  </tr>
  <tr>
  <td>Company 4</td>
  <td>Enrolled</td>
  <td>2</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>Where Date Diff is using the DATEDIFF() function (month) to find how long its been since their status was updated. I want to compare Enrollment Status and Date Diff so that if a status has changed within the past 3 months, a column will display &quot;Recently Enrolled&quot; or &quot;Recently Unenrolled&quot; instead of just &quot;Enrolled&quot; and &quot;Unenrolled&quot;.</p>