twig if Term ID is something, then do something I have a taxonomy called Fish and 2 terms in it. Bass and Gold. I have a term reference field on a Page node, and its a select list. The editor can select either Bass or Gold. And I want display something depending on what the user selects. I cannot get it to work. This is what I have tried. Below the Bass tid is '1'.

{% if node.field_term_reference.value == '1' %}
  &lt;p&gt;The value is Bass&lt;/p&gt;
{% else %}
  &lt;p&gt;The value is Gold&lt;/p&gt;
{% endif %}


Below I am outputting the string value bass.

{% if node.field_term_reference[0]['#title'] == "bass" %}
  &lt;p&gt;The value is Bass&lt;/p&gt;
{% else %}
  &lt;p&gt;The value is Gold&lt;/p&gt;
{% endif %}


Both of these return "The value is Gold"
I tried this also

{% if node.field_term_reference.label == "bass" %}
 &lt;p&gt;The value is Bass&lt;/p&gt;
{% else %}
 &lt;p&gt;The value is Gold&lt;/p&gt;
{% endif %}


What if you want to add multiple terms and use AND OR "bass" and "finch". 

{% if node.field_term_reference.entity.label == "bass" and or "finch" %}


How would it be written?
The original question is how to use the term id in a twig condition. You find the term id in the property target_id of the reference field:

{% if node.field_term_reference.target_id == '1' %}
  &lt;p&gt;The value is Bass&lt;/p&gt;
{% else %}
  &lt;p&gt;The value is Gold&lt;/p&gt;
{% endif %}