Under basic conditions and apart few extreme exceptions:
1). Primary substrates prefer SN2 substitution than E2 elimination; but E2 elimination can sometimes occur, when a strong/hard base has to attack to a poor leaving group.
2). Secondary substrates prefer E2 elimination than SN2 substitution; but SN2 substitution can also occur (but not exclusively), when a strong/hard base has to attack to a good leaving group, especially when the leaving group is a hard to borderline or a borderline base.
3). Tertiary substrates prefer E2 elimination.
4). E2 elimination prefers the Zaitsev rule, except in case of a steric hindered base or lack of the appropriate hydrogen that follows the Hoffmann rule.
Now, can you give the answer to your question, by yourself?