Posing a question while knowing the answer & then marking own reply as the solution is an unethical practice @KishorMali
Please do not adopt that.
Nevertheless, there can be some situations in which the user had a particular difficulty. Then after some trial & errors, the person finds a perfect solution. In such cases, the users can mark their answer as a solution.
I remember one incidence of a problem faced by @MortenCopenhagen as in this link.
If you know the solutions, you can create a post mentioning as “Tips on How-To’s” or “Resolved”.
But not as a question first & then pretend top provide a solution.
I become upset frequently after seeing any misaligned photo. Nevertheless, I found a solution on my desktop. The entire display can be turned through ninety degrees using hotkeys. However, instead of posing as a problem, I mentioned that as a solution.
Expecting help in case of any problem is always welcome.
However, inviting help while knowing the solution is incorrect, You may have spent a lot of time & efforts to find that, but that’s immaterial.
Nevertheless, you can write about that saying “solved” or “settled” in the heading.
Notwithstanding if you encountered a genuine problem and on that community members proposed various solutions. Then, while doing so, you improvised that & achieved an exact resolution. In that case, marking your answer as a solution would be admissible.