In a switch expression, you can return a value using the 'yield' keyword. This is crucial when more complex logic is needed in a case, like calculating discounts based on product categories in an e-commerce checkout process. For example, `yield "10% discount";` returns a value from a matched case.