Handling parsing for different scenario

what if a common row is present and how can we handle the situation,
pls tell apart from using if conditions or observing manually
any other way to do it