Power Query M code
let
Source = YourTable,
StatusMap = [Y = "Active", N = "Inactive", P = "Pending"],
AddedStatus = Table.AddColumn(
Source,
"StatusLabel",
each Record.FieldOrDefault(StatusMap, [StatusCode], "Unknown"),
type text
)
in
AddedStatus