Your design makes a number of assumptions.
- A teacher can only be in one department.
- Each department can have only one chairman.
- Chairman is the only position you'll want to store.
- You don't want to know anything more about the chairman.
- Only teachers can be chairmen.
If these assumptions hold true in realty you can solve your conundrum by taking advantage that a teacher can only be in one department. Move the "chairman" flag into the teacher table. That guarantees the chairman is a member of the department.
However, I think those assumptions won't survive an encounter with reality. If they don't it would involve significant restructuring of your schema and queries. I would restructure the schema to store the more generic staff and turn teacher into a department role. Staff and departments are in a many-to-many relationship. This relationship can be used to store the type of relationship as well as any further information.
CREATE TABLE staff (
id INTEGER PRIMARY KEY,
name TEXT NOT NULL
);
CREATE TABLE departments (
id INTEGER PRIMARY KEY,
name TEXT NOT NULL
);
CREATE TABLE department_roles (
staff_id INTEGER REFERENCES staff(id),
department_id INTEGER REFERENCES departments(id),
role ENUM('chairman', 'teacher')
);
That layout guarantees a chairman is in their own department. Constraints on department_roles can enforce business logic like having one chairman per department, or only teachers can be chairmen, and they can be removed or changed later without affecting queries. It allows adding roles in the future. It allows adding more information to those roles. It allows non-teachers to hold department roles.