Sharepoint - If A = 2, then set B to yes

Your A column is choice field with Choices (1, 2, 3).

Your B column is Calculated field with type Yes/No.

For B column calculation formula is:

=IF(A="2",TRUE,FALSE)

enter image description here

Column A

enter image description here

FINAL

enter image description here


You are close, but you only need to enclose your values in quotes if you need the values evaluated as strings.
Assuming you configured column 'A' as a numeric field type, and you have configured 'B' as a Calculated column with a Boolean (yes/no) output, then the following should work:

=If([A]=2, TRUE, FALSE)