You may be able to realise part of your investment without surrendering any ownership by refinancing the business. You raise capital by borrowing rather than by selling shares.
Alternatively, you may be able to bring in outside investors who have little or no control. For example, you could sell non-voting shares which give investors the right to a share of profits but no say in management. Similarly, a partnership might bring in a 'sleeping partner'.
Selling only part of your investment may in any case leave you with a large degree or even total control. For example, as the majority shareholder in a company you would normally be able to appoint and remove directors and so control the company's strategy.
Finally, you may wish to sell your business but prevent the new owner from certain actions. For example, you might want to protect loyal employees from the threat of being made redundant. In circumstances like this, one option is to draw up a separate agreement with the purchaser setting out any restrictions.
Clearly, any steps you take to retain control may make investing in your business less attractive to an outsider and so reduce the price you are able to achieve.