title: How to write if else condition in Azure DevOps Pipeline
body: <p>I have an azure pipeline and run with parameters where I've multiple options like below:</p>
  <p><strong>Select Test Execution</strong></p>
  <ul>
  <li>Product</li>
  <li>Product with Cost</li>
  <li>Product with Attachments</li>
  </ul>
  <p>If I select <strong><code>Product</code></strong> then I execute <strong><code>product.js</code></strong> file, if I select <strong><code>Product with Cost</code></strong> then execute <code>&quot;productCost.js&quot;</code> and so on. I've written a azure pipeline script to do this. I've another condition <strong><code>&quot;Generate Test Data&quot;</code></strong> checkbox which returns boolean value <strong><code>true</code></strong> or <strong><code>false</code></strong> if the value is <strong><code>true</code></strong> then I've to select a file <code>productWithTestData.js</code> if <code>Product</code> is selected - I don't know how to write <strong>if else</strong> condition in Azure pipeline code. Please find my pseudo code</p>
  <p>Can someone please help me how to write if else condition for my use case - appreciated your help in advance! Thanks!</p>
  <pre><code>variables:
    - name: fileName
      ${{ if eq(parameters.selectTestRun, 'Product') }}:
        value: 'product.js'
      else ${{ if eq(parameters.selectTestRun, 'Product') } &amp;&amp; { if eq(parameters.testData, True) }}:   
        value: 'productWithTestData.js'
  </code></pre>
  <p><strong>My Pipeline code:</strong></p>
  <pre><code>trigger:
    none
  
  parameters:
  
  - name: selectTestRun
    displayName: Select test execution
    type: string
    default: Product
    values:
    - Product
    - Product with Cost
    - Product with Attachments
  
  - name: testData
    displayName: Generate Test Data
    type: boolean
    default: false
  
  variables:
    - name: fileName
      ${{ if eq(parameters.selectTestRun, 'Product') }}:
        value: 'product.js'
      ${{ if eq(parameters.selectTestRun, 'Product with Cost') }}:
        value: 'productCost.js'
      ${{ if eq(parameters.selectTestRun, 'Product with Attachments') }}:
        value: 'productAttachment.js'      
    
  jobs:
    - job: testJob
      pool:
        vmImage: ubuntu-latest
      displayName: Run sample tests
      steps:
        - task: Bash@3
          displayName: Test variable
          inputs:
            targetType: inline
            script: |
              echo &quot;Hello world&quot;
              echo ${{variables.fileName}}
                  
  </code></pre>