This seems a Report that uses SQL to build required query. You have design level issues in your schema like EmployeeExecuse should be day wise excuse reason against each employee.
Anyway I tried covering most of the case with sample data. Hopefully it should give you a *Hint* so that you can modify it on your own.
select T.EmployeeNo,T.att ,
CASE when T.att < 4 then (select attreason from (SELECT 'A0002' as EmployeeNo, 'AttReason1' as attreason ) employeeExcuse where EmployeeNo = T.EmployeeNo) else 'explanation' END AS Remarks
from
(
SELECT employeeAttendance.EmployeeNo,
COUNT( employeeAttendance.EmployeeNo ) AS 'att'
--CASE att when>20 then (select attreason from employeeExcuse ) else 'explanation' END AS Remarks
FROM (
SELECT 'A0001' as EmployeeNo, '01-Jan-2021' as AttDate, 2021 as attyear, 1 as attmonth
UNION ALL SELECT 'A0001' as EmployeeNo, '02-Jan-2021' as AttDate, 2021 as attyear, 1 as attmonth
UNION ALL SELECT 'A0001' as EmployeeNo, '03-Jan-2021' as AttDate, 2021 as attyear, 1 as attmonth
UNION ALL SELECT 'A0001' as EmployeeNo, '04-Jan-2021' as AttDate, 2021 as attyear, 1 as attmonth
UNION ALL SELECT 'A0001' as EmployeeNo, '05-Jan-2021' as AttDate, 2021 as attyear, 1 as attmonth
UNION ALL SELECT 'A0002' as EmployeeNo, '01-Jan-2021' as AttDate, 2021 as attyear, 1 as attmonth
) employeeAttendance
INNER JOIN (
SELECT 'A0001' as EmployeeNo, 'EmployeeName1' as Name, 'Dept1'as Dept
UNION ALL
SELECT 'A0002' as EmployeeNo, 'EmployeeName2' as Name, 'Dept2'as Dept
) employeeInfor ON employeeAttendance.EmployeeNo = employeeInfor.EmployeeNo
GROUP BY employeeAttendance.EmployeeNo, employeeAttendance.attyear
--ORDER BY employeeAttendance.attmonth;
) T