In the members table each member is tied either to a student (via roll_no) or to a staff/faculty person (via id), and the other column is empty. Return member_no, member_class, member_type, and a computed column linked_reference that takes roll_no when it is present (not null) and otherwise falls back to id.
Database schema
primary keyforeign keyarrow points to the referenced columndrag to pan